<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>JSON Voorhees: Algorithm</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://www.mathjax.org/mathjax/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">JSON Voorhees
   </div>
   <div id="projectbrief">Killer JSON for C++</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__Algorithm.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Algorithm</div>  </div>
</div><!--header-->
<div class="contents">

<p>A collection of useful free functions a la <code></code> &lt;algorithm&gt;.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsonv_1_1compare__traits.html">jsonv::compare_traits</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Traits describing how to perform various aspects of comparison.  <a href="structjsonv_1_1compare__traits.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsonv_1_1value__compare.html">jsonv::value_compare</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares a <code>value</code> to another using the standard-issue <code><a class="el" href="group__Shared.html#ga05f2fca552d114e678040be40c8cbc06" title="Used to build a strict-ordering of JSON values. ">value::compare</a></code> function.  <a href="structjsonv_1_1value__compare.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsonv_1_1value__compare__icase.html">jsonv::value_compare_icase</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two values, ignoring the case for any <code>value</code> with <code>kind::string</code>.  <a href="structjsonv_1_1value__compare__icase.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjsonv_1_1basic__value__binary__predicate.html">jsonv::basic_value_binary_predicate&lt; FCompare, FResult &gt;</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga6b17f22c37048a7a33470a9eec597909"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6b17f22c37048a7a33470a9eec597909"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_equal_to</b> = basic_value_binary_predicate&lt; value_compare, std::equal_to&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga6b17f22c37048a7a33470a9eec597909"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac96410268b5f2341076ae0e17dc766eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac96410268b5f2341076ae0e17dc766eb"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_equal_to_icase</b> = basic_value_binary_predicate&lt; value_compare_icase, std::equal_to&lt; int &gt;&gt;</td></tr>
<tr class="separator:gac96410268b5f2341076ae0e17dc766eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga360dbf67b6b3b55c910512447ef554c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga360dbf67b6b3b55c910512447ef554c9"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_not_equal_to</b> = basic_value_binary_predicate&lt; value_compare, std::not_equal_to&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga360dbf67b6b3b55c910512447ef554c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13befc2e2be8e25304027acb802f9d82"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga13befc2e2be8e25304027acb802f9d82"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_not_equal_to_icase</b> = basic_value_binary_predicate&lt; value_compare_icase, std::not_equal_to&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga13befc2e2be8e25304027acb802f9d82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga630826cff35b44ff716cc872012ca513"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga630826cff35b44ff716cc872012ca513"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_less</b> = basic_value_binary_predicate&lt; value_compare, std::less&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga630826cff35b44ff716cc872012ca513"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga49ad5b953da45f2821dd28de3eb64b47"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga49ad5b953da45f2821dd28de3eb64b47"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_less_icase</b> = basic_value_binary_predicate&lt; value_compare_icase, std::less&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga49ad5b953da45f2821dd28de3eb64b47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59b5fe5378649a29fc15be50cd109f5b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga59b5fe5378649a29fc15be50cd109f5b"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_less_equal</b> = basic_value_binary_predicate&lt; value_compare, std::less_equal&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga59b5fe5378649a29fc15be50cd109f5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc138b68b32948f21d87303247b10f28"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacc138b68b32948f21d87303247b10f28"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_less_equal_icase</b> = basic_value_binary_predicate&lt; value_compare_icase, std::less_equal&lt; int &gt;&gt;</td></tr>
<tr class="separator:gacc138b68b32948f21d87303247b10f28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga948e515c77534bccf142b247dc7ea9a0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga948e515c77534bccf142b247dc7ea9a0"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_greater</b> = basic_value_binary_predicate&lt; value_compare, std::greater&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga948e515c77534bccf142b247dc7ea9a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga941838a981fe67cf0ebf690093fea638"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga941838a981fe67cf0ebf690093fea638"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_greater_icase</b> = basic_value_binary_predicate&lt; value_compare_icase, std::greater&lt; int &gt;&gt;</td></tr>
<tr class="separator:ga941838a981fe67cf0ebf690093fea638"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf1a0de21a4fa7e0900d7ce68a8c955cd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf1a0de21a4fa7e0900d7ce68a8c955cd"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_greater_equal</b> = basic_value_binary_predicate&lt; value_compare, std::greater_equal&lt; int &gt;&gt;</td></tr>
<tr class="separator:gaf1a0de21a4fa7e0900d7ce68a8c955cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed0e6d4d089cb05708ec58a0c16a9027"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaed0e6d4d089cb05708ec58a0c16a9027"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>jsonv::value_greater_equal_icase</b> = basic_value_binary_predicate&lt; value_compare_icase, std::greater_equal&lt; int &gt;&gt;</td></tr>
<tr class="separator:gaed0e6d4d089cb05708ec58a0c16a9027"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga18053a6a38a0ddd3739a9b253e6f8301"><td class="memTemplParams" colspan="2">template&lt;typename TCompareTraits &gt; </td></tr>
<tr class="memitem:ga18053a6a38a0ddd3739a9b253e6f8301"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#ga18053a6a38a0ddd3739a9b253e6f8301">jsonv::compare</a> (const value &amp;a, const value &amp;b, const TCompareTraits &amp;traits)</td></tr>
<tr class="memdesc:ga18053a6a38a0ddd3739a9b253e6f8301"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare the values <em>a</em> and <em>b</em> using the comparison <em>traits</em>.  <a href="#ga18053a6a38a0ddd3739a9b253e6f8301">More...</a><br /></td></tr>
<tr class="separator:ga18053a6a38a0ddd3739a9b253e6f8301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae72c162e414d753ba60c1e84b49ff2ab"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#gae72c162e414d753ba60c1e84b49ff2ab">jsonv::compare</a> (const value &amp;a, const value &amp;b)</td></tr>
<tr class="memdesc:gae72c162e414d753ba60c1e84b49ff2ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare the values <em>a</em> and <em>b</em> with strict comparison traits.  <a href="#gae72c162e414d753ba60c1e84b49ff2ab">More...</a><br /></td></tr>
<tr class="separator:gae72c162e414d753ba60c1e84b49ff2ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga74b55f49e5cab8746e5304c132ae1e87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#ga74b55f49e5cab8746e5304c132ae1e87">jsonv::compare_icase</a> (const value &amp;a, const value &amp;b)</td></tr>
<tr class="memdesc:ga74b55f49e5cab8746e5304c132ae1e87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare the values <em>a</em> and <em>b</em>, but use case-insensitive matching on <code>kind::string</code> values.  <a href="#ga74b55f49e5cab8746e5304c132ae1e87">More...</a><br /></td></tr>
<tr class="separator:ga74b55f49e5cab8746e5304c132ae1e87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f0abfde4a15bb3d727727d17e055d4d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#ga6f0abfde4a15bb3d727727d17e055d4d">jsonv::map</a> (const std::function&lt; value(const value &amp;)&gt; &amp;func, const value &amp;input)</td></tr>
<tr class="memdesc:ga6f0abfde4a15bb3d727727d17e055d4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run a function over the values in the <em>input</em>.  <a href="#ga6f0abfde4a15bb3d727727d17e055d4d">More...</a><br /></td></tr>
<tr class="separator:ga6f0abfde4a15bb3d727727d17e055d4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20a92faf8b28a6ec0ea0360cdf475f43"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#ga20a92faf8b28a6ec0ea0360cdf475f43">jsonv::map</a> (const std::function&lt; value(value)&gt; &amp;func, value &amp;&amp;input)</td></tr>
<tr class="memdesc:ga20a92faf8b28a6ec0ea0360cdf475f43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run a function over the values in the <em>input</em>.  <a href="#ga20a92faf8b28a6ec0ea0360cdf475f43">More...</a><br /></td></tr>
<tr class="separator:ga20a92faf8b28a6ec0ea0360cdf475f43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf74e9854143e94b2b014efe15eb63fdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#gaf74e9854143e94b2b014efe15eb63fdf">jsonv::traverse</a> (const value &amp;tree, const std::function&lt; void(const path &amp;, const value &amp;)&gt; &amp;func, const path &amp;base_path, bool leafs_only=false)</td></tr>
<tr class="memdesc:gaf74e9854143e94b2b014efe15eb63fdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursively walk the provided <em>tree</em> and call <em>func</em> for each item in the tree.  <a href="#gaf74e9854143e94b2b014efe15eb63fdf">More...</a><br /></td></tr>
<tr class="separator:gaf74e9854143e94b2b014efe15eb63fdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacc870c7f69dc8731b6a97afa97df43cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#gacc870c7f69dc8731b6a97afa97df43cc">jsonv::traverse</a> (const value &amp;tree, const std::function&lt; void(const path &amp;, const value &amp;)&gt; &amp;func, bool leafs_only=false)</td></tr>
<tr class="memdesc:gacc870c7f69dc8731b6a97afa97df43cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursively walk the provided <em>tree</em> and call <em>func</em> for each item in the tree.  <a href="#gacc870c7f69dc8731b6a97afa97df43cc">More...</a><br /></td></tr>
<tr class="separator:gacc870c7f69dc8731b6a97afa97df43cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e2e68ce801ca3c29f80f104dd12c99d"><td class="memItemLeft" align="right" valign="top">value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#ga9e2e68ce801ca3c29f80f104dd12c99d">jsonv::value::map</a> (const std::function&lt; value(const value &amp;)&gt; &amp;func) const &amp;</td></tr>
<tr class="memdesc:ga9e2e68ce801ca3c29f80f104dd12c99d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run a function over the values of this instance.  <a href="#ga9e2e68ce801ca3c29f80f104dd12c99d">More...</a><br /></td></tr>
<tr class="separator:ga9e2e68ce801ca3c29f80f104dd12c99d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8801c26b1bb92cf42203aea4284f82be"><td class="memItemLeft" align="right" valign="top">value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Algorithm.html#ga8801c26b1bb92cf42203aea4284f82be">jsonv::value::map</a> (const std::function&lt; value(value)&gt; &amp;func)&amp;&amp;</td></tr>
<tr class="memdesc:ga8801c26b1bb92cf42203aea4284f82be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run a function over the values of this instance.  <a href="#ga8801c26b1bb92cf42203aea4284f82be">More...</a><br /></td></tr>
<tr class="separator:ga8801c26b1bb92cf42203aea4284f82be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A collection of useful free functions a la <code></code> &lt;algorithm&gt;. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga18053a6a38a0ddd3739a9b253e6f8301"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename TCompareTraits &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int jsonv::compare </td>
          <td>(</td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const TCompareTraits &amp;&#160;</td>
          <td class="paramname"><em>traits</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compare the values <em>a</em> and <em>b</em> using the comparison <em>traits</em>. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">TCompareTraits</td><td>A type which should be compatible with the public signatures on the <code><a class="el" href="structjsonv_1_1compare__traits.html" title="Traits describing how to perform various aspects of comparison. ">compare_traits</a></code> class. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="algorithm_8hpp_source.html#l00123">123</a> of file <a class="el" href="algorithm_8hpp_source.html">algorithm.hpp</a>.</p>

</div>
</div>
<a class="anchor" id="gae72c162e414d753ba60c1e84b49ff2ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> int jsonv::compare </td>
          <td>(</td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compare the values <em>a</em> and <em>b</em> with strict comparison traits. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Shared.html#ga05f2fca552d114e678040be40c8cbc06" title="Used to build a strict-ordering of JSON values. ">value::compare</a> </dd>
<dd>
compare_icase </dd></dl>

</div>
</div>
<a class="anchor" id="ga74b55f49e5cab8746e5304c132ae1e87"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> int jsonv::compare_icase </td>
          <td>(</td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compare the values <em>a</em> and <em>b</em>, but use case-insensitive matching on <code>kind::string</code> values. </p>
<p>This does <em>not</em> use case-insensitive matching on the keys of objects!</p>
<dl class="section see"><dt>See also</dt><dd>compare </dd></dl>

</div>
</div>
<a class="anchor" id="ga6f0abfde4a15bb3d727727d17e055d4d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> value jsonv::map </td>
          <td>(</td>
          <td class="paramtype">const std::function&lt; value(const value &amp;)&gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>input</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Run a function over the values in the <em>input</em>. </p>
<p>The behavior of this function is different, depending on the <code>kind</code> of <em>input</em>. For scalar kinds (<code>kind::integer</code>, <code>kind::null</code>, etc), <em>func</em> is called once with the value. If <em>input</em> is <code>kind::array</code>, <code>func</code> is called for every value in the array and the output will be an array with each element transformed by <em>func</em>. If <em>input</em> is <code>kind::object</code>, the result will be an object with each key transformed by <em>func</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">func</td><td>The function to apply to the element or elements of <em>input</em>. </td></tr>
    <tr><td class="paramname">input</td><td>The value to transform. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga20a92faf8b28a6ec0ea0360cdf475f43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> value jsonv::map </td>
          <td>(</td>
          <td class="paramtype">const std::function&lt; value(value)&gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">value &amp;&amp;&#160;</td>
          <td class="paramname"><em>input</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Run a function over the values in the <em>input</em>. </p>
<p>The behavior of this function is different, depending on the <code>kind</code> of <em>input</em>. For scalar kinds (<code>kind::integer</code>, <code>kind::null</code>, etc), <em>func</em> is called once with the value. If <em>input</em> is <code>kind::array</code>, <code>func</code> is called for every value in the array and the output will be an array with each element transformed by <em>func</em>. If <em>input</em> is <code>kind::object</code>, the result will be an object with each key transformed by <em>func</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">func</td><td>The function to apply to the element or elements of <em>input</em>. </td></tr>
    <tr><td class="paramname">input</td><td>The value to transform.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This version of <code>map</code> provides only a basic exception-safety guarantee. If an exception is thrown while transforming a non-scalar <code>kind</code>, there is no rollback action, so <em>input</em> is left in a usable, but <em>unpredictable</em> state. If you need a strong exception guarantee, use the version of <code>map</code> that takes a constant reference to a <code>value</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga9e2e68ce801ca3c29f80f104dd12c99d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">value jsonv::value::map </td>
          <td>(</td>
          <td class="paramtype">const std::function&lt; <a class="el" href="classjsonv_1_1value.html">value</a>(const <a class="el" href="classjsonv_1_1value.html">value</a> &amp;)&gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Run a function over the values of this instance. </p>
<p>The behavior of this function is different, depending on the <code>kind</code>. For scalar kinds (<code>kind::integer</code>, <code>kind::null</code>, etc), <em>func</em> is called once with the value. If this is <code>kind::array</code>, <code>func</code> is called for every value in the array and the output will be an array with each element transformed by <em>func</em>. If this is <code>kind::object</code>, the result will be an object with each key transformed by <em>func</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">func</td><td>The function to apply to the element or elements of this instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga8801c26b1bb92cf42203aea4284f82be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">value jsonv::value::map </td>
          <td>(</td>
          <td class="paramtype">const std::function&lt; <a class="el" href="classjsonv_1_1value.html">value</a>(<a class="el" href="classjsonv_1_1value.html">value</a>)&gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Run a function over the values of this instance. </p>
<p>The behavior of this function is different, depending on the <code>kind</code>. For scalar kinds (<code>kind::integer</code>, <code>kind::null</code>, etc), <em>func</em> is called once with the value. If this is <code>kind::array</code>, <code>func</code> is called for every value in the array and the output will be an array with each element transformed by <em>func</em>. If this is <code>kind::object</code>, the result will be an object with each key transformed by <em>func</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">func</td><td>The function to apply to the element or elements of this instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This version of <code>map</code> provides only a basic exception-safety guarantee. If an exception is thrown while transforming a non-scalar <code>kind</code>, there is no rollback action, so <code>this</code> is left in a usable, but <em>unpredictable</em> state. If you need a strong exception guarantee, use the constant reference version of <code>map</code>. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf74e9854143e94b2b014efe15eb63fdf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> void jsonv::traverse </td>
          <td>(</td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::function&lt; void(const path &amp;, const value &amp;)&gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const path &amp;&#160;</td>
          <td class="paramname"><em>base_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>leafs_only</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Recursively walk the provided <em>tree</em> and call <em>func</em> for each item in the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The JSON value to traverse. </td></tr>
    <tr><td class="paramname">func</td><td>The function to call for each element in the tree. </td></tr>
    <tr><td class="paramname">base_path</td><td>The path to prepend to each output path to <em>func</em>. This can be useful if beginning traversal from inside of some JSON structure. </td></tr>
    <tr><td class="paramname">leafs_only</td><td>If true, call <em>func</em> only when the current path is a "leaf" value (<code>string</code>, <code>integer</code>, <code>decimal</code>, <code>boolean</code>, or <code>null</code> <em>or</em> an empty <code>array</code> or <code>object</code>); if false, call <em>func</em> for all entries in the tree. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gacc870c7f69dc8731b6a97afa97df43cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="config_8hpp.html#acd0703012bd724b356c177b7bc3d761d">JSONV_PUBLIC</a> void jsonv::traverse </td>
          <td>(</td>
          <td class="paramtype">const value &amp;&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::function&lt; void(const path &amp;, const value &amp;)&gt; &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>leafs_only</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Recursively walk the provided <em>tree</em> and call <em>func</em> for each item in the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tree</td><td>The JSON value to traverse. </td></tr>
    <tr><td class="paramname">func</td><td>The function to call for each element in the tree. </td></tr>
    <tr><td class="paramname">leafs_only</td><td>If true, call <em>func</em> only when the current path is a "leaf" value (<code>string</code>, <code>integer</code>, <code>decimal</code>, <code>boolean</code>, or <code>null</code> <em>or</em> an empty <code>array</code> or <code>object</code>); if false, call <em>func</em> for all entries in the tree. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
  </ul>
</div>
</body>
</html>
